<?php

class SearchController extends BaseController {
        
    public function indexAction($requestData) {
		if(isset($requestData['keyword']) && !empty($requestData['keyword'])) {
			$keywords = str_replace(" ", " +", $requestData['keyword']);
			$this->data['pageTitle'] = 'Search for: '. $keywords;
			$this->data['results'] = p1_event::search($keywords);
			
			$this->data['events'] = p1_event::getAll();
		}
    }

}

?>